<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //  Es6方法 generator 来生成迭代器
        // function *myiterator(){
        //     yield  "吴大巴拉";
        //     yield "刘老大";
        //     yield "胡老二";
        //     yield "曾小三";
        //     yield "赵老四";
            
        // }
        // let iterator = myiterator();
        // console.log(iterator.next());
        // console.log(iterator.next());
        // console.log(iterator.next());
        // console.log(iterator.next());
        // console.log(iterator.next());



        // 内置可迭代对象
        // entries keys values
         let arr =["张三","lisi","王五"];
         let keys = arr.values();
         console.log(values);
         for(let val of values){
            console.log(val);
         }

        //  let values =arr.values()
        //  console.log(values);

        //  let res = arr.entries();
        //  console.log(res);
    </script>
</body>
</html>